<?php

namespace app\common\model;

use app\common\RootModel;

class ContentBodyModel extends RootModel
{
    protected $pk = 'content_id';
    protected $table = 'sys_content_body';

    /**
     * 设置文章内容
     * @param $val
     * @return false|string
     */
    public function setContentAttr($val)
    {
        return json_encode(str_replace('<p>&nbsp;</p>', '', $val));
    }
}